public class Throws {
    public static void main(String[] args){
        throw new ArithmeticException("Number cannot be zero");
        // try {
        //     f();
        // } catch (ArithmeticException e) {
        //     // TODO: handle exception
        //     e.printStackTrace();
        //     System.out.println("异常处理");
        // }
    }
    public static void f() throws ArithmeticException{
        System.out.println(2/0);
    }
    

}